package com.example.demo;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ClassName: OrderServlet
 * Package: com.example.demo
 * Description: @Version 1.0
 */
@WebServlet("/orderFirst")
public class OrderServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Map<Integer, List<Long>> map=new HashMap<>();
        map=OrderDAO.selectSales();
        HttpSession session=request.getSession(true);
        session.setAttribute("map",map);
        request.getRequestDispatcher("/Show.jsp").forward(request,response);
    }
}
